<html>
<head><meta charset="utf-8"><title>x.py check stage 0 · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html">x.py check stage 0</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="221362891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221362891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221362891">(Jan 01 2021 at 18:32)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span>: I think I'm misunderstanding something about <code>x.py check</code>, so maybe we could continue the conversation from <a href="https://github.com/rust-lang/rust/issues/78466">#78466</a> here.</p>



<a name="221362910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221362910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221362910">(Jan 01 2021 at 18:33)</a>:</h4>
<p>My understanding is that <code>x.py check</code> doesn't have to build the compiler at all at the moment, is that correct?</p>



<a name="221362913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221362913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221362913">(Jan 01 2021 at 18:33)</a>:</h4>
<p>(i.e. without an explicit path)</p>



<a name="221362916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221362916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221362916">(Jan 01 2021 at 18:33)</a>:</h4>
<p>it doesn't build the compiler, correct. It just checks the compiler, it never goes through LLVM.</p>



<a name="221362965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221362965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221362965">(Jan 01 2021 at 18:34)</a>:</h4>
<p><code>x.py check</code> catches the error I'm interested in. Therefore, I would expect <code>x.py check library/std</code> to also catch the same error, without building the compiler.</p>



<a name="221362972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221362972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221362972">(Jan 01 2021 at 18:34)</a>:</h4>
<p>I don't see why we would need to build the compiler at all to make the behaviour the same.</p>



<a name="221362988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221362988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221362988">(Jan 01 2021 at 18:35)</a>:</h4>
<p>I presume the way <code>x.py check</code> is working is it's going: "check rustc", "check libcore", "check libstd", etc. And <code>x.py check library/std</code> is going... "check libstd"?</p>



<a name="221363006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363006">(Jan 01 2021 at 18:35)</a>:</h4>
<p>No - it's going "check libcore", "check libstd", "check rustc", "check tools"</p>



<a name="221363047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363047">(Jan 01 2021 at 18:36)</a>:</h4>
<p>this is the weird thing about the current setup, it uses the <em>master</em> libstd with the <em>beta</em> compiler to build rustc</p>



<a name="221363054"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363054" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363054">(Jan 01 2021 at 18:36)</a>:</h4>
<p>so x.py build library/std builds the standard library <em>twice</em>, once with the beta compiler and once with stage1</p>



<a name="221363064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363064">(Jan 01 2021 at 18:36)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200/near/221363047">said</a>:</p>
<blockquote>
<p>this is the weird thing about the current setup, it uses the <em>master</em> libstd with the <em>beta</em> compiler to build rustc</p>
</blockquote>
<p>Oh, huh, I didn't realise that.</p>



<a name="221363072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363072">(Jan 01 2021 at 18:37)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> this is what I meant a while ago about a leaky abstraction by the way, you don't need to know about these details until you do</p>



<a name="221363122"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363122" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363122">(Jan 01 2021 at 18:38)</a>:</h4>
<p>So <code>x.py build library/std</code> has fundamentally different behaviour from <code>x.py check library/std</code>.</p>



<a name="221363125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363125">(Jan 01 2021 at 18:38)</a>:</h4>
<p>Okay, that was my confusion, thanks.</p>



<a name="221363134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363134">(Jan 01 2021 at 18:38)</a>:</h4>
<p>Well has same behavior, just ends later in some sense</p>



<a name="221363149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363149">(Jan 01 2021 at 18:39)</a>:</h4>
<p>I would still describe it as fundamentally different because <code>cfg(not(bootstrap))</code> means you're really compiling two different versions of the same library</p>



<a name="221363154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363154">(Jan 01 2021 at 18:39)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116122">simulacrum</span> <a href="#narrow/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200/near/221363134">said</a>:</p>
<blockquote>
<p>Well has same behavior, just ends later in some sense</p>
</blockquote>
<p>Oh, but doesn't the former involves type checking rustc, but the latter doesn't?</p>



<a name="221363155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363155">(Jan 01 2021 at 18:39)</a>:</h4>
<p>i.e. it's possible to have errors that only appear with <code>build --stage 1 library/std</code>, not with stage 0</p>



<a name="221363206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363206">(Jan 01 2021 at 18:40)</a>:</h4>
<p>Both build and check have a cfg bootstrap compile for the first (std, rustc) pair</p>



<a name="221363211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363211">(Jan 01 2021 at 18:40)</a>:</h4>
<p>Just build <em>also</em> compiles a stage 1 libstd</p>



<a name="221363217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363217">(Jan 01 2021 at 18:40)</a>:</h4>
<p>Yeah, that's definitely possible - prime example being you broke the compiler</p>



<a name="221363234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363234">(Jan 01 2021 at 18:41)</a>:</h4>
<p>I just think that if <code>x.py check library/std</code> succeeds, then <code>x.py build library/std</code> shouldn't have type-checking errors, which it currently can. If the behaviour can be changed so that's true, I'm happy :)</p>



<a name="221363240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363240">(Jan 01 2021 at 18:41)</a>:</h4>
<p>(or modifying stage dependent or at least unstable feature dependent code)</p>



<a name="221363243"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363243" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363243">(Jan 01 2021 at 18:41)</a>:</h4>
<p>What kind of type error are you seeing?</p>



<a name="221363251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363251">(Jan 01 2021 at 18:41)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> this was an error in rustc_middle</p>



<a name="221363255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363255">(Jan 01 2021 at 18:41)</a>:</h4>
<p>If it's because of changes to the compiler I don't think we can do anything?</p>



<a name="221363303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363303">(Jan 01 2021 at 18:42)</a>:</h4>
<p>Build and check should behave the same for stage0 artifacts modulo llvm/monomorphization errors</p>



<a name="221363305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363305">(Jan 01 2021 at 18:42)</a>:</h4>
<p>It was an error in the compiler that could be caught by compiling rustc once (using the beta compiler), as far as I remember.</p>



<a name="221363317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363317">(Jan 01 2021 at 18:42)</a>:</h4>
<p>If they don't that's a compiler bug, most likely</p>



<a name="221363320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363320">(Jan 01 2021 at 18:42)</a>:</h4>
<p>Right, the issue is that build defaults to stage 1</p>



<a name="221363329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363329">(Jan 01 2021 at 18:43)</a>:</h4>
<p>No that's irrelevant from what you're saying</p>



<a name="221363330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363330">(Jan 01 2021 at 18:43)</a>:</h4>
<p>So it builds the compiler, so you see strictly more errors</p>



<a name="221363346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363346">(Jan 01 2021 at 18:43)</a>:</h4>
<p>Stage 0 artifacts are compiled exactly the same between check and build, modulo monomorphization errors, which shouldn't be type errors</p>



<a name="221363389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363389">(Jan 01 2021 at 18:44)</a>:</h4>
<p>And an error in rustc_middle would be in stage0 artifacts, I presume.</p>



<a name="221363540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363540">(Jan 01 2021 at 18:49)</a>:</h4>
<p>I'm confused why you think stages are irrelevant. This was an error in rustc_middle, which isn't built at all with <code>x.py check library/std</code> (because that only checks the standard library). The reason <code>build</code> caught it is because it defaults to stage 1, which builds library/std, then compiler/rustc, then library/std again.</p>



<a name="221363621"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363621" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363621">(Jan 01 2021 at 18:51)</a>:</h4>
<p>(which is the reason there's no simple solution for this, and I think the best we can do is tell people to run <code>x.py check</code> without arguments or add a <code>--stage 1</code> flag to check)</p>



<a name="221363678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363678">(Jan 01 2021 at 18:52)</a>:</h4>
<p>I suppose now that I understand what's going wrong here, I know how to avoid this confusion in the future.</p>



<a name="221363682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363682">(Jan 01 2021 at 18:52)</a>:</h4>
<p>But probably <code>x.py check &lt;path&gt;</code> in general is confusing.</p>



<a name="221363684"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363684" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363684">(Jan 01 2021 at 18:52)</a>:</h4>
<p>Maybe there should just always be a warning message saying the user probably wants to run <code>x.py check</code> without a path.</p>



<a name="221363696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363696">(Jan 01 2021 at 18:53)</a>:</h4>
<p><span class="user-mention silent" data-user-id="121053">varkor</span> <a href="#narrow/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200/near/221363684">said</a>:</p>
<blockquote>
<p>Maybe there should just always be a warning message saying to use <code>x.py check</code> without a path.</p>
</blockquote>
<p>well the problem is that there are two different users of x.py :/ one is people working on the compiler and the other is people working on the standard library</p>



<a name="221363714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363714">(Jan 01 2021 at 18:53)</a>:</h4>
<p>and if you're working on the standard library <code>x.py check library/std</code> really does make sense</p>



<a name="221363715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363715">(Jan 01 2021 at 18:53)</a>:</h4>
<p>Ah, that's true.</p>



<a name="221363769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363769">(Jan 01 2021 at 18:54)</a>:</h4>
<p>(this is one of the reasons I keep telling people cargo is insufficient to replace x.py)</p>



<a name="221363777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363777">(Jan 01 2021 at 18:54)</a>:</h4>
<p>Maybe a preceding message saying: "To also check the compiler, use <code>x.py check</code> instead."</p>



<a name="221363790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363790">(Jan 01 2021 at 18:54)</a>:</h4>
<p>we could check if <code>profile = "compiler"</code> is set maybe, and warn in that case</p>



<a name="221363860"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363860" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363860">(Jan 01 2021 at 18:56)</a>:</h4>
<p><span class="user-mention" data-user-id="121053">@varkor</span> are you interested in making a PR for that? ;)</p>



<a name="221363867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363867">(Jan 01 2021 at 18:56)</a>:</h4>
<p>it would be somewhere in <code>src/bootstrap/check.rs</code></p>



<a name="221363868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363868">(Jan 01 2021 at 18:56)</a>:</h4>
<p>I guess I find that explanation a little less confusing</p>



<a name="221363871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363871">(Jan 01 2021 at 18:56)</a>:</h4>
<p>But it seems like just a matter of defaults</p>



<a name="221363879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363879">(Jan 01 2021 at 18:57)</a>:</h4>
<p>I can do, but I'm not going to be able to get to it for a little while. It's not urgent either, though.</p>



<a name="221363891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363891">(Jan 01 2021 at 18:57)</a>:</h4>
<p>Which is I guess always the problem : x.py tries to understand what you want and pick the best option and (usually) fails.</p>



<a name="221363947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363947">(Jan 01 2021 at 18:58)</a>:</h4>
<p>I think the most succinct way of explaining my confusion (as <span class="user-mention" data-user-id="232545">@Joshua Nelson</span> was pointing out) is that <code>x.py check</code> means "check with the stage0 compiler" and <code>x.py build</code> means "build with the stage1 compiler", if I understand correctly now — and this makes quite a difference if you're working on the compiler.</p>



<a name="221363969"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363969" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363969">(Jan 01 2021 at 18:59)</a>:</h4>
<p>Which is confusing if you're expecting them to behave like <code>cargo build</code>/<code>cargo check</code>, which behave identically to one another.</p>



<a name="221363981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221363981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221363981">(Jan 01 2021 at 19:00)</a>:</h4>
<p>yeah :/ I'm not sure how to make that any simpler though</p>



<a name="221364029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221364029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221364029">(Jan 01 2021 at 19:00)</a>:</h4>
<p>other than telling everyone to read the bootstrapping chapter <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>



<a name="221364123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221364123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221364123">(Jan 01 2021 at 19:02)</a>:</h4>
<p>Maybe the bootstrapping chapter could contain a sentence about <code>check</code> vs <code>build</code> to be explicit (unless it's written somewhere already I just didn't spot).</p>



<a name="221364142"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221364142" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221364142">(Jan 01 2021 at 19:03)</a>:</h4>
<p>I could add in <a href="https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html#default-stages">https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html#default-stages</a> that <code>check</code> is hardcoded to --stage 0 maybe</p>



<a name="221364541"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221364541" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221364541">(Jan 01 2021 at 19:12)</a>:</h4>
<p><a href="https://github.com/rust-lang/rustc-dev-guide/pull/999">https://github.com/rust-lang/rustc-dev-guide/pull/999</a></p>



<a name="221364551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221364551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221364551">(Jan 01 2021 at 19:13)</a>:</h4>
<p>That chapter is too long as it is</p>



<a name="221365334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/x.py%20check%20stage%200/near/221365334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/x.2Epy.20check.20stage.200.html#221365334">(Jan 01 2021 at 19:35)</a>:</h4>
<p>(later conversation moved to <a href="#narrow/stream/131828-t-compiler/topic/different.20entry.20points.20for.20x.2Epy">https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/different.20entry.20points.20for.20x.2Epy</a>)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>